const router = require("koa-router")()
const { getBannerList, updateBannerList, deleteBannerList } = require("../controller/banner")
router.prefix('/api/banner')

// banner 请求
router.post('/bannerList', async (ctx, next) => {
  await getBannerList(ctx, ctx.request.body)
})

// banner 添加
router.post('/updateBannerList', async (ctx) => {
  await updateBannerList(ctx, ctx.request.body)
})

// banner 删除失败
router.post("/deleteBannerList", async (ctx, next) => {
  await deleteBannerList(ctx, ctx.request.body)
})

module.exports = router